import request from '@/utils/request'
import { getPlaid } from '@/utils/auth'

/**
 * 获取链接输入
 */
export function getLinkInput() {
  return request({
    url: '/common/getLinkInput',
    method: 'post',
    data: { plaid: getPlaid() }
  })
}

/**
 * 清除缓存
 * @param type 清除类型
 */
export function dkClear(type) {
  return request({
    url: '/common/clear',
    method: 'post',
    data: { type }
  })
}

/**
 * 获取客户菜单
 */
export function getCustomerMenu() {
  return request({
    url: '/common/getCustomerMenu',
    method: 'post',
    data: {}
  }, {
    repeat_request_cancel: false
  })
}

/**
 * 获取模板钩子内容
 */
export function getTemplateHooks(data) {
  return request({
    url: '/common/getTemplateHooks',
    method: 'post',
    data: data || {}
  }, {
    repeat_request_cancel: false
  })
}
